﻿using Neo4jClient;
using System;
using System.Collections.Generic;
using System.Configuration;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Titul.Help.Storages
{
    public abstract class SimpleStorage<T>
    {
        private const string __heo4jConnectionString = "heo4jConnectionString";

        protected GraphClient Client
        {
            get
            {
                return Neo4j.DataProvider.Neo4jGrafClient.Instance(ConfigurationManager.AppSettings[__heo4jConnectionString]);
            }
        }

        public abstract IEnumerable<T> All { get; }

        public abstract T Create(T model);

        public abstract T Single(int id);

        public abstract T Single(string seoUrl);

        public abstract T Edit(T model);
    }
}
